package game.entity.terrain;

import java.util.regex.Pattern;

import game.entity.Terrain;
import game.room.Room;

/** */
public class Tunnel extends Terrain {
	@Override
	public final boolean validatePosition(final Room room, final int layer,
		final int row, final int col) {
		return Pattern.compile("([N]{3}|[WST]{3})[WST].[WST]([N]{3}|[WST]{3})")
			.matcher(
				room.getTerrainString(layer, row - 1, col - 1, layer, row + 1,
					col + 1)).find();
	}
}
